package com.xxgc.helloworld.controller;

import com.xxgc.helloworld.bean.Users;
import com.xxgc.helloworld.po.Info;
import com.xxgc.helloworld.service.ILoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/login")
@Api(value="用户登录接口",tags ="用户登录接口",description = "用于用户登录")
public class LoginController {

    @Autowired
    private ILoginService ils;

    @ApiOperation(value = "用户登录", notes = "用户登录")
    @PostMapping("/namePassLogin")
    @ResponseBody
    public Info namePassLogin(@RequestBody Users user){
        return ils.namePassLogin(user);
    }
}
